/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 @author Javier Aparicio García
 */
package formula.one.urjc.dueño.view;

import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JList;
import javax.swing.JTextField;

/**
 *
 * @author Javier Aparicio García
 */
public class VentanaDueñoFichaje extends JInternalFrame{

    /** Creates new form VentanaDueñoFichaje */
    public VentanaDueñoFichaje() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabelPilotosOficiales = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jListPilotosOficiales = new javax.swing.JList();
        jLabelPilotosProb = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jListPilotoProbador = new javax.swing.JList();
        jLabelPresupuesto = new javax.swing.JLabel();
        jTextPresupuesto = new javax.swing.JTextField();
        jLabelOtras = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jListPilotosConEscuderia = new javax.swing.JList();
        jLabelPiltotosLibres = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jListPilotosLibres = new javax.swing.JList();
        jBtFichar = new javax.swing.JButton();
        jBtIntercambio = new javax.swing.JButton();
        jBtDespedir = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Fichajes");

        jLabelPilotosOficiales.setText("Mis Pilotos Oficiales:");

        jListPilotosOficiales.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane1.setViewportView(jListPilotosOficiales);

        jLabelPilotosProb.setText("MisPilotos Probadores:");

        jListPilotoProbador.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane2.setViewportView(jListPilotoProbador);

        jLabelPresupuesto.setText("Presupuesto:");

        jTextPresupuesto.setEditable(false);

        jLabelOtras.setText("Otras Escuderías:");

        jListPilotosConEscuderia.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane3.setViewportView(jListPilotosConEscuderia);

        jLabelPiltotosLibres.setText("Pilotos Libres:");

        jListPilotosLibres.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane4.setViewportView(jListPilotosLibres);

        jBtFichar.setText("Fichar");

        jBtIntercambio.setText("Intercambiar");

        jBtDespedir.setText("Despedir");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabelPilotosProb)
                            .add(jLabelPresupuesto)
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, 0, 0, Short.MAX_VALUE)
                                .add(org.jdesktop.layout.GroupLayout.LEADING, jLabelPilotosOficiales, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                .add(org.jdesktop.layout.GroupLayout.LEADING, jTextPresupuesto)
                                .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabelOtras)
                            .add(jScrollPane3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 128, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(27, 27, 27)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabelPiltotosLibres)
                            .add(jScrollPane4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)))
                    .add(layout.createSequentialGroup()
                        .add(93, 93, 93)
                        .add(jBtFichar)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jBtIntercambio)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jBtDespedir)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabelOtras)
                            .add(jLabelPiltotosLibres))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jScrollPane4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                            .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)))
                    .add(layout.createSequentialGroup()
                        .add(jLabelPilotosOficiales)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 47, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabelPilotosProb)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabelPresupuesto)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jTextPresupuesto, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jBtFichar)
                    .add(jBtIntercambio)
                    .add(jBtDespedir))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VentanaDueñoFichaje.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VentanaDueñoFichaje.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VentanaDueñoFichaje.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VentanaDueñoFichaje.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VentanaDueñoFichaje().setVisible(true);
            }
        });
    }

    public JButton getjBtDespedir() {
        return jBtDespedir;
    }

    public JButton getjBtFichar() {
        return jBtFichar;
    }

    public JButton getjBtIntercambio() {
        return jBtIntercambio;
    }


    public JList getjListPilotoProbador() {
        return jListPilotoProbador;
    }

    public JList getjListPilotosConEscuderia() {
        return jListPilotosConEscuderia;
    }

    public JList getjListPilotosLibres() {
        return jListPilotosLibres;
    }

    public JList getjListPilotosOficiales() {
        return jListPilotosOficiales;
    }

    public JTextField getjTextPresupuesto() {
        return jTextPresupuesto;
    }

    public DefaultListModel getModelPilotosLibres() {
        if(modelPilotosLibres==null){
            modelPilotosLibres=new DefaultListModel();
        }
        return modelPilotosLibres;
    }

    public DefaultListModel getModelMisPilotosProbadores() {
        if(modelMisPilotosProbadores==null){
            modelMisPilotosProbadores=new DefaultListModel();
        }
        return modelMisPilotosProbadores;
    }

    public DefaultListModel getModelMisPiltosoOfic() {
        if(modelMisPiltosoOfic==null){
            modelMisPiltosoOfic=new DefaultListModel();
        }
        return modelMisPiltosoOfic;
    }

    public DefaultListModel getModelOtrosPilotos() {
       if(modelOtrosPilotos==null){
            modelOtrosPilotos=new DefaultListModel();
        }
        return modelOtrosPilotos;
    }
    
    
    
    private DefaultListModel modelMisPilotosProbadores;
    private DefaultListModel modelMisPiltosoOfic;
    private DefaultListModel modelOtrosPilotos;
    private DefaultListModel modelPilotosLibres;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBtDespedir;
    private javax.swing.JButton jBtFichar;
    private javax.swing.JButton jBtIntercambio;
    private javax.swing.JLabel jLabelOtras;
    private javax.swing.JLabel jLabelPilotosOficiales;
    private javax.swing.JLabel jLabelPilotosProb;
    private javax.swing.JLabel jLabelPiltotosLibres;
    private javax.swing.JLabel jLabelPresupuesto;
    private javax.swing.JList jListPilotoProbador;
    private javax.swing.JList jListPilotosConEscuderia;
    private javax.swing.JList jListPilotosLibres;
    private javax.swing.JList jListPilotosOficiales;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTextField jTextPresupuesto;
    // End of variables declaration//GEN-END:variables
}
